package com.chen.common;

import javafx.geometry.Rectangle2D;
import javafx.stage.Screen;

/**
 * @Description
 * @Author Pengwei
 * @CreatDate 2021/11/12 01:37
 */
public class ScreenUtils {

    //获取屏幕相关信息
    public static Rectangle2D getScreen() {
        return Screen.getPrimary().getBounds();
    }

    //获取屏幕相关信息-高度
    public static double getScreenH() {
        return getScreen().getHeight();
    }

    //获取屏幕相关信息-宽度
    public static double getScreenW() {
        return getScreen().getWidth();
    }
}
